package com.feinno.urcs.group.log;

import com.feinno.superpojo.type.EnumInteger;

/**
 * Created by wuhao on 15-10-14.
 */
public enum MessageType implements EnumInteger {

    UNKNOWN(0), NORMAL(1), GROUP(2), BARCYCLE(3), PUBACC(4), MASS(5), BROADCAST(6), DIRECTIONAL(7);

    int value;

    private MessageType(int value) {
        this.value = value;
    }

    public int intValue() {
        return value;
    }
    public static MessageType parse(int value) {
        switch (value) {
            case 0:
                return UNKNOWN;
            case 1:
                return NORMAL;
            case 2:
                return GROUP;
            case 3:
                return BARCYCLE;
            case 4:
                return PUBACC;
            case 5:
                return MASS;
            case 6:
                return BROADCAST;
            case 7:
                return DIRECTIONAL;
            default:
                return null;
        }
    }
}
